package main

import "fmt"

func main() {
	var arr [3][4]int
	for i := 0; i < 3; i++ {
		for j := 0; j < 4; j++ {
			arr[i][j] = i * j
		}
	}
	for i := 0; i < 3; i++ {
		for j := 0; j < 4; j++ {
			print(arr[i][j], " ")
		}
		println()
	}

	// 下标访问
	fmt.Println(arr[2][3]) // 6

	// 输出每一行
	for _, row := range arr {
		fmt.Println(row) // [0 0 0 0][0 1 2 3][0 2 4 6]
	}
}
